package com.ruoyi.basedata.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basedata.mapper.BdSupplierMapper;
import com.ruoyi.basedata.domain.BdSupplier;
import com.ruoyi.basedata.service.IBdSupplierService;

/**
 * 供应商Service业务层处理
 * 
 * @author ptt
 * @date 2023-02-15
 */
@Service
public class BdSupplierServiceImpl implements IBdSupplierService 
{
    @Autowired
    private BdSupplierMapper bdSupplierMapper;

    /**
     * 查询供应商
     * 
     * @param id 供应商主键
     * @return 供应商
     */
    @Override
    public BdSupplier selectBdSupplierById(Long id)
    {
        return bdSupplierMapper.selectBdSupplierById(id);
    }

    /**
     * 查询供应商列表
     * 
     * @param bdSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<BdSupplier> selectBdSupplierList(BdSupplier bdSupplier)
    {
        return bdSupplierMapper.selectBdSupplierList(bdSupplier);
    }

    /**
     * 新增供应商
     * 
     * @param bdSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertBdSupplier(BdSupplier bdSupplier)
    {
        return bdSupplierMapper.insertBdSupplier(bdSupplier);
    }

    /**
     * 修改供应商
     * 
     * @param bdSupplier 供应商
     * @return 结果
     */
    @Override
    public int updateBdSupplier(BdSupplier bdSupplier)
    {
        return bdSupplierMapper.updateBdSupplier(bdSupplier);
    }

    /**
     * 批量删除供应商
     * 
     * @param ids 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteBdSupplierByIds(Long[] ids)
    {
        return bdSupplierMapper.deleteBdSupplierByIds(ids);
    }

    /**
     * 删除供应商信息
     * 
     * @param id 供应商主键
     * @return 结果
     */
    @Override
    public int deleteBdSupplierById(Long id)
    {
        return bdSupplierMapper.deleteBdSupplierById(id);
    }
}
